package com.cms.common.model.services.impl;


import com.cms.common.model.entity.Translate;
import com.cms.common.model.repository.TranslateRepository;
import com.cms.common.model.services.TranslateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("TranslateService")
public class TranslateServiceImpl implements TranslateService {

    @Autowired
    TranslateRepository translateRepository;


    @Override
    public List<Translate> addTranslates(List<Translate> translates) {
        return translateRepository.saveAllAndFlush(translates);
    }

    @Override
    public void deleteTranslates(List<Translate> translates) {
        translateRepository.deleteAll(translates);
    }
}
